import GraphBack from '../../src'
const canvas = document.createElement('canvas')
canvas.style.position = 'fixed'
canvas.style.width = canvas.style.height = '100%'
canvas.style.top = canvas.style.left = '0'
document.body.appendChild(canvas)

// 场景
const scene = new GraphBack.Scene(canvas)

const rect = new GraphBack.Rect({ x: 50, y: 100, width: 200 })
const box = rect.getBoundBox()
const lineGradient = new GraphBack.LineGradient(box.left, box.top, box.right, box.bottom)
lineGradient.add(0, 'red')
lineGradient.add(1, 'blue')
rect.option.color = lineGradient
scene.add(rect)

scene.render()
